package com.wave.wavesystem.business.pojo.emums.user;

import wave.common.pojo.entity.KV;
import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Arrays;
import java.util.List;

/**
 * @author 夕下风波
 * @date 2025-01-22
 * @description 用户性别枚举
 */
@Getter
@AllArgsConstructor
public enum UserGenderEnum {

    UNDEFINED(0, "未定义"),
    BOY(1, "男"),
    GIRL(2, "女"),
    THIRD_GENDER(3, "第三方性别");

    final Integer code;
    final String text;

    public static List<KV<String, Integer>> list() {
        return Arrays.stream(UserGenderEnum.values())
                .map(item -> new KV<String, Integer>(item.getText(), item.getCode())).toList();
    }

}
